<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPH::BaseMesh Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_s_p_h.html">SPH</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_base_mesh.html">BaseMesh</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_s_p_h_1_1_base_mesh-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPH::BaseMesh Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for all meshes.  
 <a href="class_s_p_h_1_1_base_mesh.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="base__mesh_8h_source.html">base_mesh.h</a>&gt;</code></p>

<p>Inherited by <a class="el" href="class_s_p_h_1_1_base_data_package.html">SPH::BaseDataPackage&lt; 4, 6 &gt;</a>, <a class="el" href="class_s_p_h_1_1_base_data_package.html">SPH::BaseDataPackage&lt; PKG_SIZE, ADDRS_SIZE &gt;</a>, and <a class="el" href="class_s_p_h_1_1_mesh.html">SPH::Mesh</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a06e00f3689429e2b174e3da6a7021900"><td class="memItemLeft" align="right" valign="top"><a id="a06e00f3689429e2b174e3da6a7021900"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>BaseMesh</b> (<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> number_of_grid_points)</td></tr>
<tr class="separator:a06e00f3689429e2b174e3da6a7021900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00a3bee5412ec539c8cd068d504cd45b"><td class="memItemLeft" align="right" valign="top"><a id="a00a3bee5412ec539c8cd068d504cd45b"></a>
Vecd&#160;</td><td class="memItemRight" valign="bottom"><b>MeshLowerBound</b> ()</td></tr>
<tr class="separator:a00a3bee5412ec539c8cd068d504cd45b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a075244782af1e6dccff264c569e29dab"><td class="memItemLeft" align="right" valign="top"><a id="a075244782af1e6dccff264c569e29dab"></a>
Real&#160;</td><td class="memItemRight" valign="bottom"><b>GridSpacing</b> ()</td></tr>
<tr class="separator:a075244782af1e6dccff264c569e29dab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6f44b0d0886d0fd8cbbbded978fca8c"><td class="memItemLeft" align="right" valign="top"><a id="ad6f44b0d0886d0fd8cbbbded978fca8c"></a>
<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>NumberOfGridPoints</b> ()</td></tr>
<tr class="separator:ad6f44b0d0886d0fd8cbbbded978fca8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae302fc10695090e00d24c39f8e9a2678"><td class="memItemLeft" align="right" valign="top"><a id="ae302fc10695090e00d24c39f8e9a2678"></a>
<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>GridIndexFromPosition</b> (const Vecd &amp;position)</td></tr>
<tr class="separator:ae302fc10695090e00d24c39f8e9a2678"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8ead27d4828a6cdc50e5cdd56b7ae86"><td class="memItemLeft" align="right" valign="top"><a id="ad8ead27d4828a6cdc50e5cdd56b7ae86"></a>
Vecd&#160;</td><td class="memItemRight" valign="bottom"><b>GridPositionFromIndex</b> (<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> grid_index)</td></tr>
<tr class="separator:ad8ead27d4828a6cdc50e5cdd56b7ae86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1926fe2d95f91ae08e16c12e46fca210"><td class="memItemLeft" align="right" valign="top"><a id="a1926fe2d95f91ae08e16c12e46fca210"></a>
<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&#160;</td><td class="memItemRight" valign="bottom"><b>transfer1DtoMeshIndex</b> (<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> number_of_grid_points, <a class="el" href="classsize__t.html">size_t</a> i)</td></tr>
<tr class="separator:a1926fe2d95f91ae08e16c12e46fca210"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab854b17cf6c10bf15eafcf1ad9c4f633"><td class="memItemLeft" align="right" valign="top"><a id="ab854b17cf6c10bf15eafcf1ad9c4f633"></a>
<a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>transferMeshIndexTo1D</b> (<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> number_of_grid_points, <a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> grid_index)</td></tr>
<tr class="separator:ab854b17cf6c10bf15eafcf1ad9c4f633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2b22b19b1175c3e5d8c014e00a1602c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_mesh.html#ae2b22b19b1175c3e5d8c014e00a1602c">MortonCode</a> (const <a class="el" href="classsize__t.html">size_t</a> &amp;i)</td></tr>
<tr class="separator:ae2b22b19b1175c3e5d8c014e00a1602c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a815229fa561c3cf114a6ddb77bdb247c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsize__t.html">size_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_mesh.html#a815229fa561c3cf114a6ddb77bdb247c">transferMeshIndexToMortonOrder</a> (<a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> grid_index)</td></tr>
<tr class="separator:a815229fa561c3cf114a6ddb77bdb247c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ac8559448b24066e06263bff0aa5ba75b"><td class="memItemLeft" align="right" valign="top">Vecd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_mesh.html#ac8559448b24066e06263bff0aa5ba75b">mesh_lower_bound_</a></td></tr>
<tr class="separator:ac8559448b24066e06263bff0aa5ba75b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6c2e186b771c3573486cdcbaa362b25"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_mesh.html#af6c2e186b771c3573486cdcbaa362b25">grid_spacing_</a></td></tr>
<tr class="separator:af6c2e186b771c3573486cdcbaa362b25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e1e27e30924c3390d8cdd20dba606fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_base_mesh.html#a5e1e27e30924c3390d8cdd20dba606fd">number_of_grid_points_</a></td></tr>
<tr class="separator:a5e1e27e30924c3390d8cdd20dba606fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all meshes. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ae2b22b19b1175c3e5d8c014e00a1602c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2b22b19b1175c3e5d8c014e00a1602c">&#9670;&nbsp;</a></span>MortonCode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsize__t.html">size_t</a> SPH::BaseMesh::MortonCode </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classsize__t.html">size_t</a> &amp;&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>converts mesh index into a Morton order. Interleave a 10 bit number in 32 bits, fill one bit and leave the other 2 as zeros <a href="https://stackoverflow.com/questions/18529057/">https://stackoverflow.com/questions/18529057/</a> produce-interleaving-bit-patterns-morton-keys-for-32-bit-64-bit-and-128bit </p>

</div>
</div>
<a id="a815229fa561c3cf114a6ddb77bdb247c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a815229fa561c3cf114a6ddb77bdb247c">&#9670;&nbsp;</a></span>transferMeshIndexToMortonOrder()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsize__t.html">size_t</a> SPH::BaseMesh::transferMeshIndexToMortonOrder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&#160;</td>
          <td class="paramname"><em>grid_index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function converts mesh index into a Morton order. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="af6c2e186b771c3573486cdcbaa362b25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6c2e186b771c3573486cdcbaa362b25">&#9670;&nbsp;</a></span>grid_spacing_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::BaseMesh::grid_spacing_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>grid_spacing </p>

</div>
</div>
<a id="ac8559448b24066e06263bff0aa5ba75b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8559448b24066e06263bff0aa5ba75b">&#9670;&nbsp;</a></span>mesh_lower_bound_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vecd SPH::BaseMesh::mesh_lower_bound_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>mesh lower bound as reference coordinate </p>

</div>
</div>
<a id="a5e1e27e30924c3390d8cdd20dba606fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e1e27e30924c3390d8cdd20dba606fd">&#9670;&nbsp;</a></span>number_of_grid_points_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_s_p_h_1_1_s_vec.html">Vecu</a> SPH::BaseMesh::number_of_grid_points_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>number of grid points by dimension </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>SPHINXsys/src/shared/meshes/<a class="el" href="base__mesh_8h_source.html">base_mesh.h</a></li>
<li>SPHINXsys/src/for_2D_build/meshes/<a class="el" href="for__2_d__build_2meshes_2base__mesh__supplementary_8cpp.html">base_mesh_supplementary.cpp</a></li>
<li>SPHINXsys/src/shared/meshes/<a class="el" href="base__mesh_8cpp.html">base_mesh.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
